// var Api = "http://songyujianiu.qicp.vip/";
var Api = "http://192.168.5.197:9000";
var app = new Vue({
	el: "#app",
	data: function() {
		return {
			aaa: "",
			loginName: "2222",
			password: "",
		};
	},
	created: function() {
		// layer.msg("用户名不能为空", { time: 1000 });
		const par = new URLSearchParams();
		// par.append("loginName", that.loginName);
		// par.append("password", that.password);
		// var that = this
		axios({
			method: "post",
			url: 'http://127.0.0.1:9000/equip/findfzbyuname?uname=admin',
			params: par,
		}).then(function(res) {
			// console.log(res);
			if (res.data.code == "101") {
				// layer.msg("注册成功", { time: 1000 });
				app.aaa = res.data.data;
				// console.log(res.data.data);
				
			} else {
				
				layer.msg(res.data.message, {
					time: 1000
				});
			}
		});
	},
	methods: {
		//
		// 保存
		start: function(triName) {
			// alert(triName)
			let that = this;
			const par = new URLSearchParams();
			par.append("triName", triName);
			// par.append("password", that.password);
			axios({
				method: "post",
				url: Api + "/quartz/start",
				params: par,
			}).then(function(res) {
				console.log(res);
				if (res.data.code == "101") {
					// alert("注册成功");
					layer.msg("启动成功", {
						time: 1000
					});
					
				} else {
					layer.msg(res.data.message, {
						time: 7000
					});
				}
			});
		}

	
	}
});
